<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Highstock Example</title>

<script type="text/javascript"
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript">
	function imt(d) {

		var y = d.split("-");

		//if (y.length == 1) y = d.split("-");

		return Date.UTC(y[0], y[1]-1, y[2]);

	}

	var chart;

	$(document).ready(
			function() {

				chart = new Highcharts.Chart({

					chart : {

						renderTo : 'container',

						zoomType : 'x',

						defaultSeriesType : 'spline'

					},

					title : {

						text : '居民消费价格指数(CPI) 与 工业品出厂价格指数(PPI)',

						x : -20
					//center

					},

					subtitle : {

						text : '来源：5nian.net',

						x : -20

					},

					xAxis : {

						type : 'datetime',

						title : {

							text : null

						}

					},

					yAxis : {

						/*max:12,*/

						tickInterval : 1,

						title : {

							text : null

						},

						plotLines : [ {

							value : 0,

							width : 1,

							color : '#808080'

						} ]

					},

					tooltip : {

						formatter : function() {

							return '<b>' + this.series.name + '</b><br/>' +

							Highcharts.dateFormat('%Y-%m-%d', this.x) + ': '
									+ Highcharts.numberFormat(this.y,1) + '';

						}

					},

					/*					plotOptions: {

					 spline: {

					 marker: {

					 radius: 4,

					 lineColor: '#666666',

					 lineWidth: 1

					 }

					 }

					 },

					 */plotOptions : {

						spline : {

							lineWidth : 2,

							states : {

								hover : {

									lineWidth : 3

								}

							},

							marker : {

								enabled : false,

								states : {

									hover : {

										enabled : true,

										symbol : 'circle',

										radius : 5,

										lineWidth : 1

									}

								}

							}

						}

					},

					series : [ {
						name : '居民消费价格指数(CPI)',

						data : cpi

					}, {
						name : '工业品出厂价格指数(PPI)',

						data : ppi

					} ]

				});

			});
</script>

</head>
<body>

<script type="text/javascript" src="../js/highstock.js"></script>
<script type="text/javascript" src="../js/modules/exporting.js"></script>
<script type="text/javascript" src="../data/ppi.js"></script>
<script type="text/javascript" src="../data/cpi.js"></script>


<div id="container" style="height: 500px"></div>
</body>
</html>
